% TABLE 3

clear all;

B = dlmread('csweights.dat')
ii=B(:,1);
jj=B(:,2);
ss=B(:,3);
clear B;
E=sparse(ii,jj,ss,409,409);
clear ii; clear jj; clear ss;
A = dlmread('hurr.dat');


% fixed effects spatial autocorrelation program written by: J.Paul Elhorst 9/2004
% University of Groningen
% Department of Economics
% 9700AV Groningen
% the Netherlands
% j.p.elhorst@eco.rug.nl
%
% dimensions of the problem
T=36; % number of time periods
N=409; % number of regions
nobs=N*T;
% row-normalize W
W=normw(E); % function of LeSage


% Table 3 - Column (1)
y=A(:,[3]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[4]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(nobs,1);

info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial');
prt_sp(results,vnames,1);

% Table 3 - Column (2)
x=A(:,[4,5]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr');
prt_sp(results,vnames,1);

% Table 3 - Column (3)
x=A(:,[4,5, 6]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr','hurrl');
prt_sp(results,vnames,1);

% Table 3 - Column (4)
x=A(:,[4,7]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurri');
prt_sp(results,vnames,1);

% Table 3 - Column (5)
x=A(:,[4,8]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','cspeed');
prt_sp(results,vnames,1);

% Table 3 - Column (6)
x=A(:,[4,9]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','speed');
prt_sp(results,vnames,1);


% Table 3 - Column (9)
x=A(:,[4,5, 12]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hurr','old_p2');
prt_sp(results,vnames,1);





clear all;

B = dlmread('csweights.dat')
ii=B(:,1);
jj=B(:,2);
ss=B(:,3);
clear B;
E=sparse(ii,jj,ss,409,409);
clear ii; clear jj; clear ss;
A = dlmread('hdumm.dat');

% Dataset downloaded from www.wiley.co.uk/baltagi/
% Spatial weights matrix constructed by Elhorst
%
% written by: J.Paul Elhorst 9/2004
% University of Groningen
% Department of Economics
% 9700AV Groningen
% the Netherlands
% j.p.elhorst@eco.rug.nl
%
% dimensions of the problem
T=36; % number of time periods
N=409; % number of regions
nobs=N*T;
% row-normalize W
W=normw(E); % function of LeSage

% Table 3 - Column (7)
y=A(:,[3]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[4,5,8]); % column numbers in the data matrix that correspond to the independent variables
xconstant=ones(nobs,1);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hd','nhd');
prt_sp(results,vnames,1);

% Table 3 - Column (8)
x=A(:,[4,6,7,9,10]);
info.lflag=0;
info.model=3;
results=sem_panel(y,x,W,T,info);
vnames=strvcat('growth','initial','hd13','hd45','nhd13','nhd45');
prt_sp(results,vnames,1);
